package com.wxy.student.dao;


import com.wxy.student.entity.Grade;
import com.wxy.student.entity.Student;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface GradeDao extends JpaRepository<Grade, Integer> {



    @Transactional
    @Modifying
    @Query(name = "deleteGradeId", nativeQuery = true, value =
            "delete  from grade where id= ?1")
    int deleteGradeId(Integer id);

}